<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
class PHPExcel_Worksheet_MemoryDrawing extends PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable
{
    private $imageResource;
    private $renderingFunction;
    private $mimeType;
    private $uniqueName;
    const RENDERING_DEFAULT = "imagepng";
    const RENDERING_PNG = "imagepng";
    const RENDERING_GIF = "imagegif";
    const RENDERING_JPEG = "imagejpeg";
    const MIMETYPE_DEFAULT = "image/png";
    const MIMETYPE_PNG = "image/png";
    const MIMETYPE_GIF = "image/gif";
    const MIMETYPE_JPEG = "image/jpeg";
    public function __construct()
    {
        $this->imageResource = NULL;
        $this->renderingFunction = "imagepng";
        $this->mimeType = "image/png";
        $this->uniqueName = md5(rand(0, 9999) . time() . rand(0, 9999));
        parent::__construct();
    }
    public function getImageResource()
    {
        return $this->imageResource;
    }
    public function setImageResource($value = NULL)
    {
        $this->imageResource = $value;
        if(!is_null($this->imageResource)) {
            $this->width = imagesx($this->imageResource);
            $this->height = imagesy($this->imageResource);
        }
        return $this;
    }
    public function getRenderingFunction()
    {
        return $this->renderingFunction;
    }
    public function setRenderingFunction($value = PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT)
    {
        $this->renderingFunction = $value;
        return $this;
    }
    public function getMimeType()
    {
        return $this->mimeType;
    }
    public function setMimeType($value = PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT)
    {
        $this->mimeType = $value;
        return $this;
    }
    public function getIndexedFilename()
    {
        $extension = strtolower($this->getMimeType());
        $extension = explode("/", $extension);
        $extension = $extension[1];
        return $this->uniqueName . $this->getImageIndex() . "." . $extension;
    }
    public function getHashCode()
    {
        return md5($this->renderingFunction . $this->mimeType . $this->uniqueName . parent::getHashCode() . "PHPExcel_Worksheet_MemoryDrawing");
    }
    public function __clone()
    {
        $vars = get_object_vars($this);
        foreach ($vars as $key => $value) {
            if(is_object($value)) {
                $this->{$key} = clone $value;
            } else {
                $this->{$key} = $value;
            }
        }
    }
}

?>